package org.csu.forum.domain.VO;


import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.csu.forum.domain.PO.Titlepost;
import org.csu.forum.domain.PO.UserTitlePost;
import org.csu.forum.domain.PO.Zone;
import org.springframework.stereotype.Component;

import java.io.Serializable;

@Data
@Component

public class TitlepostContentVO implements Serializable {

    @JsonIgnore
    private Titlepost titlepost;

    @JsonIgnore
    private UserTitlePost userTitlePost;

    @JsonIgnore
    private Zone zone;

    private int postid;

    private String content;

    private int zoneid;

    private Boolean istop;

    private Boolean isesscence;

    private Boolean isreport;

    private Boolean isvote;

    private int sectionid;

    @JsonIgnore
    private int userid;

    private String zonename;

    private String zonedescription;

    public TitlepostContentVO(){
        this.titlepost = new Titlepost();
        this.userTitlePost = new UserTitlePost();
        this.zone = new Zone();
    }


    public Titlepost getTitlepost(){return titlepost;}

    public void setTitlepost(Titlepost titlepost){this.titlepost = titlepost;}

    public UserTitlePost getUserTitlePost(){return userTitlePost;}

    public void setUserTitlePost(UserTitlePost userTitlePost){this.userTitlePost = userTitlePost;}

    public Zone getZone(){return zone;}

    public void setZone(Zone zone){this.zone = zone;}

    public void setParameter(){
//        this.titlepost.setSectionid(this.sectionid);
//        this.titlepost.setIsreport(this.isreport);
//        this.titlepost.setIsesscence(this.isesscence);
//        this.titlepost.setContent(this.content);
//        this.titlepost.setIstop(this.istop);
//        this.titlepost.setIsvote(this.isvote);
//        this.titlepost.setPostid(this.postid);
//        this.titlepost.setZoneid(this.zoneid);
//        this.userTitlePost.setPostid(this.postid);
//        this.userTitlePost.setPostid(this.postid);
//        this.zone.setZoneid(this.zoneid);
//        this.zone.setSectionid(this.sectionid);
//        this.zone.setZonename(this.zonename);
//        this.zone.setZonedescription(this.zonedescription);
        this.sectionid = this.titlepost.getSectionid();
        this.isreport = this.titlepost.getIsreport();
        this.isesscence = this.titlepost.getIsesscence();
        this.content = this.titlepost.getContent();
        this.istop = this.titlepost.getIstop();
        this.isvote = this.titlepost.getIsvote();
        this.postid = this.titlepost.getPostid();
        this.zoneid = this.titlepost.getZoneid();
        this.sectionid = this.zone.getSectionid();
        this.zonename = this.zone.getZonename();
        this.zonedescription = this.zone.getZonedescription();


    }

}
